import HNDiscover from 'pages/discover'
import HNMine from 'pages/mine'
import HNFriends from 'pages/friends'
import HNArtist from 'pages/discover/c-pages/artist'
import HNDjradio from 'pages/discover/c-pages/djradio'
import HNRanking from 'pages/discover/c-pages/ranking'
import HNRecommend from 'pages/discover/c-pages/recommend'
import HNSongs from 'pages/discover/c-pages/songs'
import HNAlbum from 'pages/discover/c-pages/album'
import HNPlayer from 'pages/player'
import { Redirect } from 'react-router-dom'

const routes=[
    {
        path:"/",
        exact:true,
        render : ()=>(
            <Redirect to="/discover"/>
        )
    },
    {
        path:"/discover",
        component:HNDiscover,
        routes:[
            {
                path:"/discover",
                exact : true,
                render:()=>(
                    <Redirect to="/discover/recommend"/>
                )
            },
            {
                path:"/discover/recommend",
                component:HNRecommend
            },
            {
                path:"/discover/artist",
                component:HNArtist
            },
            {
                path:"/discover/djradio",
                component:HNDjradio
            },
            {
                path:"/discover/toplist",
                component:HNRanking
            },
            {
                path:"/discover/playlist",
                component:HNSongs
            },
            {
                path:"/discover/album",
                component:HNAlbum
            },
            {
                path:"/discover/player",
                component:HNPlayer
            }
        ]
    },
    {
        path:"/mine",
        component:HNMine
    },
    {
        path:"/friends",
        component:HNFriends
    },
];

export default routes;